package com.cssw.fyzb.core.dao.acct;

import com.cssw.fyzb.core.model.dodb.UserCashOut;
import com.ydn.dbframe.plugin.activerecord.Page;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

/**
 * @Author zhouxu
 * @create 2020-12-25 16:34
 */
public interface UserCashOutDao {

    Long addCashOut(Long userId, int cashOutRatio, BigDecimal cashOutFee, BigDecimal handlingFee, BigDecimal cashAmount, String cashAcctType, Long acctId, String acctType);

    Long addCashOut(Long userId, int cashOutRatio, BigDecimal cashOutFee, BigDecimal handlingFee, BigDecimal cashAmount, String cashAcctType, Long acctId, String acctType, String status);

    void updateDrawcashId(Long cashId, String drawcashId);

    void updateCashStatus(Long cashId, String cashStatus);

    void updateCashError(Long cashId, String cashStatus, String errorCode, String errorMsg);

    void saveCashOutLog(Long cashId, String status, String cashStatus, String remark);

    UserCashOut getByDrawcashId(String drawcashId);

    void updateStatus(Long cashId, String status);

    Page list(int page, int limit, Map param);

    void addCashOutAli(Long cashId, String aliNo, String realName, String receQrCode);

    void addCashOutWechat(Long cashId, String wechatNo, String realName, String receQrCode);

    void addCashOutBank(Long cashId, Long bankId, String cardNo, String realName, String bankName, String openBank, String bankCode, String provCode, String cityCode);

    Integer countCurrMonthGzCashNum(Long userId, Date firstDate, Date lastDate, String acctType);

    BigDecimal sumCurrMonthGzCashFee(Long userId, Date firstDate, Date lastDate, String acctType);
}
